package com.you.pattern.decorator;

public abstract class BatterCakeDecorator extends BatterCake {

    //静态代理，委派
    private BatterCake batterCake;

    public BatterCakeDecorator(BatterCake batterCake) {
        this.batterCake = batterCake;
    }

    //增加额外的处理，比如加辅助食物，鸡蛋、果子
    protected abstract void additionalSomething();

    @Override
    protected String makeBatterCake() {
        return this.batterCake.makeBatterCake();
    }

    @Override
    protected int calculatePrice() {
        return this.batterCake.calculatePrice();
    }
}
